setting up the accelerometer